import React from "react";
import { Select as AntdSelect } from "../../antd/index";
import CloseIcon from "./CloseIcon";
import "./style/index";
import { SelectProps, SelectValue } from "../../antd/select";
export type Props<VT extends SelectValue = SelectValue> = SelectProps<VT> & {};

const { Option, OptGroup } = AntdSelect;

class Select extends React.Component<Props> {
  static Option: typeof Option;
  static OptGroup: typeof OptGroup;

  constructor(props: Props) {
    super(props);
  }
  render() {
    const selectProps = {
      clearIcon: <CloseIcon isShowBg />,
      removeIcon: <CloseIcon />,
      ...this.props,
    };
    return <AntdSelect {...selectProps} />;
  }
}
export { Option, OptGroup };
export default Select;
